package tank;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;

/**
 * @Auther: fei
 * @Date: 2021/6/9 - 06 - 09 - 21:18
 * @Description: tank
 * @version: 1.0
 */
public class ResourceMgr {
    public static BufferedImage goodtankL = null,goodtankU = null ,goodtankR = null,goodtankD = null;
    public static BufferedImage badtankL = null,badtankU = null ,badtankR = null,badtankD = null;
    public static BufferedImage bulletL = null,bulletU = null ,bulletR = null,bulletD = null;
    public static BufferedImage explode = null;

    static{
        try {
            goodtankU = ImageIO.read(ResourceMgr.class.getClassLoader().getResourceAsStream("images/goodTankU.png"));
            goodtankL = ImageUtil.rotateImage(goodtankU,-90);
            goodtankR = ImageUtil.rotateImage(goodtankU,90);
            goodtankD = ImageUtil.rotateImage(goodtankU,180);

            badtankU = ImageIO.read(ResourceMgr.class.getClassLoader().getResourceAsStream("images/badTankU.png"));
            badtankL = ImageUtil.rotateImage(badtankU,-90);
            badtankR = ImageUtil.rotateImage(badtankU,90);
            badtankD = ImageUtil.rotateImage(badtankU,180);

            bulletU = ImageIO.read(ResourceMgr.class.getClassLoader().getResourceAsStream("images/bulletU.png"));
            bulletL = ImageUtil.rotateImage(bulletU,-90);
            bulletR = ImageUtil.rotateImage(bulletU,90);
            bulletD = ImageUtil.rotateImage(bulletU,180);

            explode = ImageIO.read(ResourceMgr.class.getClassLoader().getResourceAsStream("images/explode.png"));

        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
